﻿using System;
using System.ComponentModel.DataAnnotations;

namespace HQPad.Models
{
    public class Posting
    {
        [Required, Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int PostingID { get; set; }

        [Display(Name = "Posting content")]
        public string Content { get; set; }

        [Display(Name = "Date created")]
        [Required(ErrorMessage = "A created date is required")]
        public DateTime Created { get; set; }

        [Display(Name = "Date last modified")]
        [Required(ErrorMessage = "A last modified date is required")]
        public DateTime LastModified { get; set; }

        [Display(Name = "Last changed by user")]
        public string UserName { get; set; }

        [Display(Name = "Posting key")]
        [Required(ErrorMessage = "A posting key is required")]
        public string PostingKey { get; set; }

        [Display(Name = "Posting group")]
        [Required(ErrorMessage = "A posting group is required")]
        public string PostingGroup { get; set; }
    }
}